package com.navinfo.platform.examples.parquet;

import org.apache.spark.sql.SparkSession;

public class JavaDataStatistic {
    public static void main(String[] args) {
//        System.setProperty("hadoop.home.dir", "c:\\winutil\\");
        System.setProperty("hadoop.home.dir", "D:\\workenv\\winutil");
        SparkSession spark = SparkSession
                .builder().master("local[4]")
                .appName("JavaDataStatistic")
                .config("spark.sql.warehouse.dir", "hdfs://nhdp1.hadoop.com:8020/apps/hive/warehouse")
                .config("spark.sql.hive.metastore.jars","maven")
                .enableHiveSupport()
                .getOrCreate();
        spark.sql("show tables").show(false);

        spark.sql("select * from dataplatform.vehicle_basic_data_info_day").show(false);
    }
}